package com.atguigu.gmall.all.contoller;

import com.atguigu.gmall.order.client.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * @author: 李旭
 * @create: 2021-07-23 11:28
 *
 * 结算
 **/
@Controller
public class TradeController {


    @Autowired
    private OrderFeignClient orderFeignClient;
    //去结算
    @GetMapping("/trade.html")
    public String trade(Model model){
        Map<String, Object> result = orderFeignClient.trade();
        model.addAllAttributes(result);
        return "order/trade";
    }
}
